package guoanmaker.provider.business.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import guoanmaker.provider.business.model.PerviderDictionary;
import guoanmaker.provider.business.service.ProviderDictionaryServiceInterface;
import guoanmaker.provider.helper.common.AjaxJson;
import guoanmaker.provider.helper.common.abstractobj.ApiController;
import io.swagger.annotations.ApiOperation;
/**
 * 
* @ClassName: ProviderDictionaryController
* @Description:数据字典 (这里用一句话描述这个类的作用) 
* @author lihongyu
* @date 2017年7月10日 下午3:05:42 
*  
 */
@RestController
@RequestMapping(ApiController.DICTIONARY_URL)
public class ProviderDictionaryController {
	@Autowired
	private ProviderDictionaryServiceInterface providerDictionaryServiceInterface;
	@Autowired
	private  AjaxJson ajaxJson;
	 @ApiOperation(value = "身份类型列表", notes = "身份类型列表 ")
	    @PostMapping(value = "selectByfatheridList")
	public AjaxJson selectByfatheridList(String fatherID){
		List<PerviderDictionary> pds=providerDictionaryServiceInterface.selectdicList(fatherID);
		if(pds.size()!=0){
			ajaxJson.setSuccess(true).setStatus(200).setData(pds);
		}else{
			ajaxJson.setSuccess(true).setStatus(250);
		}
		return ajaxJson;
	}
}
